import axios from '../http/htttp.js'
import qs from 'qs'
// 商铺广告
// 渲染列表
export function Shoplist (data) {
  return axios({
    method: 'get',
    params: {
      _gp: 'admin.advertisement',
      _mt: 'queryAdvertisement',
      ...data
    }
  })
}
// 获取SPU树
export function Shoptree () {
  return axios({
    method: 'get',
    params: {
      _gp: 'admin.goods',
      _mt: 'getSpuBigTree'
    }
  })
}
// 添加修改
export function Shopaddupdate (data) {
  return axios({
    method: 'post',
    data: qs.stringify({
      _gp: 'admin.advertisement',
      _mt: data._mt,
      ...data
    })
  })
}
// 删除
export function Shopdel (data) {
  return axios({
    method: 'post',
    params: {
      _gp: 'admin.advertisement',
      _mt: 'deleteAdvertisement',
      ...data
    }
  })
}
